package com.umeng.soexample.mvp.model;

import com.umeng.lib_core.http.MResponseManager;
import com.umeng.lib_core.mvp.model.BaseModel;
import com.umeng.soexample.bean.UserEntity;
import com.umeng.soexample.mvp.contract.UserLoginFragmentContract;
import com.umeng.soexample.network.API;

import javax.inject.Inject;

import io.reactivex.Observable;

public class UserLoginFragmentModel extends BaseModel implements UserLoginFragmentContract.UserLoginIModel {

    @Inject
    public UserLoginFragmentModel() {}

    @Override
    public Observable<UserEntity> login(String request) {
        return MResponseManager.obtainRetrofit(API.class).login_request(request);
    }

    @Override
    public Observable<UserEntity> register(String request) {
        return MResponseManager.obtainRetrofit(API.class).register_request(request);
    }

    @Override
    public void destroy() {

    }
}
